package part1.api.io.iotest2;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos);
        String line = "我爱中国";
        osw.write(line);
        System.out.println("写出完毕");
        osw.close();
    }
}
